#!/usr/bin/env sh

# 终止一个错误
set -e

# 构建
yarn build

# 进入生成的构建文件夹
cd docs/.vuepress/dist

git init
git add -A
git commit -m '文档更新'

# 如果你想要部署到 https://<USERNAME>.github.io/<REPO>
git push -f git@gitee.com:wyzhgx/epg-focus.git master:master

# 链接远程仓库
git remote add origin git@gitee.com:wyzhgx/epg-focus.git
# 拉取远程仓库文件
git pull --rebase origin master
# 同步更新代码
git push -u origin master
cd -